package com.z.base;

import java.util.List;

@SuppressWarnings("rawtypes")
public class Page {
	private List list;
	private int pageNo = 1;
	private int pageSize = 10;
	// 总记录数
	private int totalCount = -1;
	// 总记录数
	private int totalPages = -1;
	
	public void computeTotalPages() {
        if (this.totalCount == -1) {
        	totalPages = -1;
        }
        int count = this.totalCount / this.pageSize;
        if (this.totalCount % this.pageSize > 0) {
            count++;
        }
        totalPages = count;
    }

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(int totalPages) {
		this.totalPages = totalPages;
	}

}
